﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CardLogistics.Model.Purchase;
using CardLogistics.Web.Components;
using System.Data;

namespace CardLogistics.Web.MainPage.Purchase.Contract_PayInfo
{
    public partial class Detail : BasePage
    {
        private static readonly CardLogistics.DAL.Purchase.Purchase_Contract_PayinfoData DAL = new DAL.Purchase.Purchase_Contract_PayinfoData();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitControl();
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public void InitControl()
        {
            string _key = Request.QueryString["id"];
            if (!string.IsNullOrEmpty(_key))
            {
                Purchase_Contract_Payinfo sData = DAL.GetModel(_key);
                SetWebControls(this.Page, sData);
                PayTypeName.Text = sData.PayTypeName;//付款方式
                PAYDATE.Text = Convert.ToDateTime(sData.PAYDATE).ToString("yyyy-MM-dd");//付款日期
            }

        }
    }
}